package com.wyy.demo;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 测试controller
 */
@RestController
public class TestController {

    /**
     * 主页面
     * @param request
     * @param name
     * @return
     */
    @RequestMapping("/hello")
    public String hello(HttpServletRequest request,String name){
        System.out.println("======="+request.getParameter("name"));
        return "hello "+name+"!";
    }
}
